package com.xb.controller;

import com.xb.entity.Dept;
import com.xb.entity.Result;
import com.xb.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    DeptService service;

    @RequestMapping("/findAll")
    public Result findAll() {
        return new Result(true, "查询成功", service.findAll());
    }

    @RequestMapping("/show")
    public Result find(){
        return new Result(true, "查询成功", service.find());
    }
}
